import request from '@/utils/request'

// 获取经纪列表
export const getAgentsList = params => request({
  url: '/agents',
  method: 'get',
  params
})

// 新增经纪
export const addAgents = data => request({
  url: '/agents',
  method: 'post',
  data
})

// 获取经纪详情
export const getAgentsDetail = id => request({
  url: '/agents/' + id
})

// 删除经纪
export const delAgents = id => request({
  url: '/agents/' + id,
  method: 'delete'
})

// 更新经纪
export const editAgents = data => request({
  url: '/agents/' + data.id,
  method: 'put',
  data
})

// 获取经纪数量
export const getNumAgents = params => request({
  url: '/agents/count',
  params
})
